package com.bw.goods.mvvm.model;

import com.bw.mvvm_comom.entity.BaseEntity;
import com.bw.mvvm_comom.model.BaseModel;
import com.bw.mvvm_comom.network.ChangeFunction;
import com.bw.mvvm_comom.network.HttpEnum;
import com.bw.mvvm_comom.network.HttpFactory;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;

public class HomeValueModel extends BaseModel {
    public Observable<BaseEntity> requestAddCar(HashMap<String,Object> map){
        return changeFunc(HttpFactory.create(HttpEnum.Token)
        .getRetrofit().create(Api.class)
        .requestAddCar(createBody(map)));

    }

    public Observable<BaseEntity> requestGoods(HashMap<String,Object>map){
        return changeFunc(HttpFactory.create(HttpEnum.TokenSign)
                        .getRetrofit().create(Api.class)
                        .requestHomeGoods(createBody(map)));
    }
}
